/*
 * @Author: XieQiu 雪球
 * @Date: 2021-06-03 08:57:52
 * @LastEditTime: 2021-06-03 11:25:31
 * @LastEditors: XieQiu 雪球
 * @Description: 设备类型管理接口
 */
import xjaxiosEquipment from "@/api/axios";
import xjaxios from "@/api/axios";

export default {
  /**
   * @description: 获取设备类型列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {componyId: 1} *
   * @param {String} order 排序方式 ASC DESC 默认ASC
   * @param {String} sort 自定义排序方式 'createTime'
   * @return {Array}
   */
  getTreeList(params) {
    return xjaxios.post("/commonService/equipmentType/queryTreeList", params);
  },
  queryTreeList(typeName) {
    return xjaxiosEquipment.get(`equipmentType/queryTreeListByTypeName/${typeName}`);
  },
  /**
   * @description: 添加add,删除delList,修改设施edit
   * @param {Object} params *
   * @return {Object}
   */
  allmetInfo(params, met) {
    params.organizationNo = sessionStorage.organizationNo;
    return xjaxios.post(`/commonService/equipmentType/${met}`, params);
  }
};
